package com.xxxx.server.service;

import com.xxxx.server.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.server.pojo.RespBean;
import com.xxxx.server.pojo.Role;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhoubin
 * @since 2022-01-12
 */
        public interface IAdminService extends IService<Admin> {
        Admin getAdminByID(Integer id);
            /**
             * 登录返回token
             * @param username
             * @param password
             * @return
             */
            RespBean login(String username, String password, String code, HttpServletRequest request);
        Admin getAdminByUserName(String username);
            /**
             * 通过用户id获取用户角色
             */
            List<Role> getRoles(Integer id);

            /**
             * 获取所有操作员
             */
            List<Admin> getAllAdmin(String keywords);
            /**
             * 修改操作员角色
             */
            RespBean updateAdminRole(Integer adminId ,Integer [] rids);

      RespBean updatePassword(String oldPass, String pass, Integer adminId);

    RespBean updateAdminUserFace(String url, Integer id, Authentication authentication);
}


